#include<bits/stdc++.h>
#define ll long long
#define ull unsigned long long
#define ls (x<<1)
#define rs (x<<1 | 1)
using namespace std;

const ull N = 2e5 + 10;
const ull P = 1e9 + 7;

ull n, m;
ull a[N];
struct node
{
    ull l, r;
    ull _0, _1, lazy;
}t[N << 4];

ull ksm(ull a, ull b)
{
    ull res = 1;
    while (b) {
        if (b & 1) res = res * a;
        a = a * a;b >>= 1;
    }
    return res;
}

void pushup(ull x) {
    t[x]._0 = t[ls]._0 + t[rs]._0;
    t[x]._1 = t[ls]._1 + t[rs]._1;
}
void pushdown(ull x)
{
    if (t[x].lazy != 0) {
        t[ls].lazy += t[x].lazy;
        t[rs].lazy += t[x].lazy;

        ull tmp = ksm(P, t[x].lazy);
        t[ls]._0 *= tmp, t[ls]._1 *= tmp;
        t[rs]._0 *= tmp, t[rs]._1 *= tmp;
        t[x].lazy = 0;
    }
}

void build(ull x, ull l, ull r)
{
    t[x].l = l;t[x].r = r;
    t[x].lazy = 0;
    if (l == r) {
        if ((l & 1) == 0) t[x]._0 = ksm(P, a[l]), t[x]._1 = 0;
        else t[x]._1 = ksm(P, a[l]), t[x]._0 = 0;
        return;
    }
    ull mid = (l + r) >> 1;
    build(ls, l, mid);build(rs, mid + 1, r);
    pushup(x);
}

void modify(ull x, ull l, ull r, ull v)
{
    if (l <= t[x].l && t[x].r <= r) {
        ull tmp = ksm(P, v);
        t[x]._0 *= tmp; t[x]._1 *= tmp;
        t[x].lazy += v;
        return;
    }
    pushdown(x);
    ull mid = (t[x].l + t[x].r) >> 1;
    if (l <= mid) modify(ls, l, r, v);
    if (r > mid) modify(rs, l, r, v);
    pushup(x);
}

pair<ull, ull> query(ull x, ull l, ull r)
{
    if (l <= t[x].l && t[x].r <= r)  return { t[x]._0,t[x]._1 };
    pushdown(x);
    ull mid = (t[x].l + t[x].r) >> 1;
    pair<ull, ull> res = { 0,0 };
    if (l <= mid) {
        pair<ull, ull> tmp = query(ls, l, r);
        res.first += tmp.first;
        res.second += tmp.second;
    }
    if (r > mid) {
        pair<ull, ull> tmp = query(rs, l, r);
        res.first += tmp.first;
        res.second += tmp.second;
    }
    return res;
}

inline int read()
{
    int x = 0, f = 1;
    char ch = getchar();
    while (ch < '0' || ch>'9') {
        if (ch == '-') f = -1;
        ch = getchar();
    }
    while (ch >= '0' && ch <= '9')
        x = x * 10 + ch - '0', ch = getchar();
    return x * f;
}

void solve()
{
    n = read();m = read();
    for (ull i = 1;i <= n;i++) cin >> a[i];
    build(1, 1, n);

    ull op, l, r;
    ull v;
    while (m--) {
        op = read(), l = read(), r = read();
        if (op == 0) {
            cin >> v;
            modify(1, l, r, v);
        } else {
            pair<ull, ull> ans = query(1, l, r);
            puts(ans.first == ans.second ? "YES" : "NO");
        }
    }
}

signed main()
{
    // ios::sync_with_stdio(0);
    // cin.tie(0);cout.tie(0);
#define ONLINE_JUDGE
#ifndef ONLINE_JUDGE
    std::istringstream in(R"()");
    std::cin.rdbuf(in.rdbuf());
#endif
    ull T = 1;
    //cin>>T;
    for (ull i = 1;i <= T;i++) {
        solve();
    }
}